<!DOCTYPE html>
<html lang="zh-CN">
	
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta charset="utf-8">
		<title>{$title}</title>

		<!--字体图标库-->
		<link rel="stylesheet" href="__TPL__/team/css/ectouch.css" />
	</head>

	<body>
		<div class="con">
			<div id="loading"><img src="__TPL__/team/images/loading.gif" /></div>
			<div class="ect-bg">
				{if !$subscribe}
					<div class="ect-header-banner dis-box">
						<div class="box-flex">
							<div class="ect-header-text fl">
								<h4>欢迎进入<span class="ec-tag">微商城</span></h4>
								<p>关注公众号,享专属服务</p>
							</div>
						</div>
						<a class="btn-submit1 j-ewm-box" href="javascript:;">立即关注</a>
					</div>
					<div class="index-weixin-box">
						<div><img src="__TPL__/statics/img/ewm.png"></div>
						<p class="text-c">长按二维码关注公众微信</p>
					</div>
					<div class="index-bg-box"></div>
					{/if}
							
				<header class="dis-box header-menu-1 b-color color-whie goods-fixed goods-fixed-raise ts-3 active" style="position: relative;">
					<a class="" href="javascript:history.go(-1)">
						<div class="goods-left-jiat active"><i class="iconfont icon-mn-jiantoul is-con"></i></div>
					</a>
					<div class="box-flex">
						<nav class="shopping-list-nav goods-shopping-list-nav box-flex swiper-container-horizontal ">
							<ul class="swiper-wrapper goods-header-nav-box-raise dis-box text-c">		
								<li class="div1 box-flex swiper-slide active  swiper-slide-active position-rel" category="1">
									<a class="product-div-link" href="{:url('goods/index',array('id'=>$this->_var['id']))}"></a>商品</li>
								<li class="div3 box-flex swiper-slide swiper-slide-next position-rel" category="3">
									<a class="product-div-link" href="{:url('goods/info',array('id'=>$this->_var['id']))}"></a>详情</li>					
								<li class="div4 box-flex swiper-slide position-rel" category="4">
									<a class="product-div-link" href="{:url('goods/comment_list',array('id'=>$this->_var['goods']['goods_id']))}"></a>评论</li>								
							</ul>										
						</nav>
					</div>
					<a class="" href="javascript:;">
						<div class="goods-left-jiat active"><i class="iconfont icon-menu icon-gengduo is-con"></i></div>
					</a>
					<div class="goods-nav ts-3">
						<ul class="goods-nav-box">
							<a href="{:url('index/index')}">
								<li><i class="iconfont icon-home"></i>首页</li>
							</a>

							<a href="{:url('category/top_all')}">
								<li><i class="iconfont icon-category"></i>分类</li>
							</a>
							<a href="{:url('flow/cart')}">
								<li><i class="iconfont icon-cart"></i>购物车</li>
							</a>
							<a href="{:url('user/index')}">
								<li style="border:none"><i class="iconfont icon-profile"></i>个人中心</li>
							</a>
						</ul>
					</div>
				</header>
			</div>
			<div class="cont-pb">
				<div class="index-banner swiper-container box position-rel banner-first goods-banner j-goods-box">
					<div class="swiper-wrapper">
						<!--商品相册-->
						<!--{if $pictures}-->
						<!-- {foreach from=$pictures item=picture name=no}-->
						<div class="swiper-slide" id="img-photo-box">
							<img src="{$picture.img_url}" />
						</div>
						<!--{/foreach}-->
						<!--{else}-->
						<div class="swiper-slide" id="img-photo-box">
							<img src="{$goods.goods_img}" />
						</div>
						<!--{/if}-->

					</div>
					<div class="swiper-pagination banner-first-pagination"></div>
				</div>
				<div class="goods-bg-box">
					<div class="goods-list-close position-abo"><i class="iconfont icon-guanbi text-r"></i></div>
				</div>
				<section class="goods-title b-color-f padding-all ">
					<div class="dis-box">
						<h3 class="box-flex">{$goods.goods_style_name}</h3>
						<!--点击收藏-->
						<span class="heart j-heart <!--{if $sc eq 1}-->active<!--{/if}-->" onClick="collect({$goods.goods_id})" id='ECS_COLLECT'><i class="ts-2"></i><em class="ts-2 font-03 db text-c col-5">收藏</em></span>
					</div>
				</section>
				<section class="goods-price padding-all b-color-f">
					<p class="p-price">
						<span class="ec-tag font-2-1">
							<!--{if $goods.is_promote and $goods.gmt_end_time } 促销-->
							{$goods.promote_price}
							<!--{else}-->
							{$goods.shop_price_formated}
							<!--{/if}-->						
						</span>
						<!--{if $goods.is_team}验证是否是团购商品star-->
						<em class="em-promotion b-tag">拼团中</em>
						<!--{else}-->
						<em class="em-promotion b-tag">积分可抵现</em>
						<!--{/if}验证是否是团购商品star-->
					</p>
					<p class="p-market">市场价 <del>{$goods.market_price}</del></p>
					<!--{if $cfg.show_goodsnumber}商品库存-->
					<p class=" dis-box g-p-tthree m-top06">
						<span class="box-flex text-l">销量 {$sales_count}</span>
						<span class="box-flex text-r">库存 {$goods.goods_number}</span>
					</p>
					<!--{/if}-->
				</section>

				<!-- {if $promotion} 优惠活动 -->
				<section class="ect-margin-tb ect-margin-bottom0 ect-padding-tb goods-promotion ect-padding-lr n-activity-list b-color-f">
					<h5>{$lang.activity}</h5>
					<p class="ect-border-top ect-margin-tb">
						<!-- {foreach from=$promotion item=item key=key} 优惠活动-->
						<!-- {if $item.type eq "snatch"} -->
						<a href="{$item.url}" title="{$lang.snatch}"><i class="label tbqb">{$lang.snatch_act}</i> [{$lang.snatch}]<i class="pull-right fa fa-angle-right"></i></a>
						<!-- {elseif $item.type eq "group_buy"} -->
						<a href="{$item.url}" title="{$lang.group_buy}"><i class="label tuan">{$lang.group_buy_act}</i> [{$lang.group_buy}]{$item.time}<i class="pull-right fa fa-angle-right"></i></a>
						<!-- {elseif $item.type eq "auction"} -->
						<a href="{$item.url}" title="{$lang.auction}"><i class="label pm">{$lang.auction_act}</i> [{$lang.auction}]<i class="pull-right fa fa-angle-right"></i></a>
						<!-- {elseif $item.type eq "favourable"} -->
						<a href="{$item.url}" title="{$lang.$item.type} {$item.act_name}{$item.time}">
							<!--{if $item.act_type eq 0}-->
							<i class="label mz">{$lang.favourable_mz}</i>
							<!--{elseif $item.act_type eq 1}-->
							<i class="label mj">{$lang.favourable_mj}</i>
							<!--{elseif $item.act_type eq 2}-->
							<i class="label zk">{$lang.favourable_zk}</i>
							<!--{/if}-->{$item.act_name}{$item.time} <i class="pull-right fa fa-angle-right"></i></a>
						<!-- {/if} -->
						<!-- {/foreach} -->
					</p>
				</section>
				<!-- {/if} -->

				<section class="m-top1px padding-all b-color-f goods-service j-show-div m-top10">
					<div class="dis-box">
						<div class="box-flex">
							<div class="dis-box">
								<i class="iconfont icon-102 goods-min-icon"></i>
								<!--服务信息star-->
								<div class="show-goods-service j-filter-show-div ts-3 b-color-1">
									<section class="goods-show-title of-hidden padding-all b-color-f">
										<h3 class="fl g-c-title-h3">服务说明</h3>
										<i class="iconfont icon-guanbi show-div-guanbi fr"></i>
									</section>
									<section class="goods-show-con goods-big-service swiper-scroll swiper-container-vertical swiper-container-free-mode">
										<div class="swiper-wrapper">
											<div class="swiper-slide swiper-slide-active">
												<ul class="goods-service-nav-list">
													<li class="b-color-f padding-all of-hidden">
														<p class="dis-box t-remark3">
															<label class="box-flex"><i class="iconfont icon-baozhang"></i><span>品质保证</span></label>
														</p>
														<p class="g-b-s-con">自实际收货日期的次日起7天内，商品完好，可申请退换货哦！</p>
													</li>
													<li class="b-color-f padding-all of-hidden">
														<p class="dis-box t-remark3">
															<label class="box-flex"><i class="iconfont icon-wuliu"></i><span>放心物流</span></label>
														</p>
														<p class="g-b-s-con">放心物流，可以按预期时间精确收货哦！</p>
													</li>
													<li class="b-color-f padding-all of-hidden">
														<p class="dis-box t-remark3">
															<label class="box-flex"><i class="iconfont icon-heart"></i><span>贴心服务</span></label>
														</p>
														<p class="g-b-s-con">支持送货上门后再收款，支持现金、POS机刷卡等方式</p>
													</li>
												</ul>
											</div>
										</div>

									</section>
								</div>
								<!--服务信息end-->
							</div>
							<section class="m-top1px  b-color-f goods-service-nav">
								<div class="dis-box">
									<div class="box-flex"><i class="iconfont icon-baozhang"></i><span>品质保证</span></div>
									<div class="box-flex"><i class="iconfont icon-wuliu"></i><span>放心物流</span></div>
									<div class="box-flex"><i class="iconfont icon-heart"></i><span>贴心服务</span></div>
									<div class="box-flex"><span class="t-jiantou fr"><i class="iconfont icon-mn-jiantour"></i></span></div>
								</div>
							</section>
						</div>
					</div>
				</section>
				<!--{if $goods.is_team}验证是否是团购商品star-->
				<!--拼团玩法-->
				<section class="b-color-f m-top10">
					<div class="dis-box m-top1px goods-service">
						<div class="show-goods-service j-filter-show-div ts-3 b-color-1">
							<section class="goods-show-title of-hidden padding-all b-color-f">
								<h3 class="fl g-c-title-h3">规则说明</h3>
								<i class="iconfont icon-guanbi show-div-guanbi fr"></i>
							</section>
						</div>
						<div class="box  b-color-f padding-all m-top1px ">
							<h3 class="recom-title">拼团规则</h3>
						</div>
					</div>
					<div class="dis-box group-detail-cont font-03 text-c col-6 position-rel">
						<div class="box-flex position-rel">
							<label class="num-left">1</label>
							<p class="">选择商品</p>
							<div class="n-list-xian-first position-abo"></div>
						</div>
						<div class="box-flex position-rel">
							<label class="num-left">2</label>
							<p class="">开团/参团</p>
							<div class="n-list-xian position-abo"></div>
						</div>
						<div class="box-flex position-rel">
							<label class="num-left">3</label>
							<p class="">邀请好友</p>
							<div class="n-list-xian position-abo"></div>
						</div>
						<div class="box-flex position-rel">
							<label class="num-left">4</label>
							<p class="">人满成团</p>
							<div class="n-list-xian-last position-abo"></div>
						</div>

					</div>
					<div class="goods-mn-jiantou  j-goods-guize-box position-rel "><i class="iconfont icon-mn-jiantoul ts-5"></i></div>
					<ul class="goods-service-nav-list goods-show-box ts-5">
						<li class="padding-all of-hidden">
							<p class="g-b-s-con">1.开团：在商城内选择喜欢的商品，点击“去开团”，付款成功后即为开团成功；</p>
							<p class="g-b-s-con">2.参团：进入朋友分享的页面，点击“立即参团”，付款后即为参团成功，若多人同时支付，按先支付成功的用户获得参团资格；</p>
							<p class="g-b-s-con">3.成团：在开团或参团之后,可以点击“分享出去”，在有效时间凑齐成团人数即拼团成功；</p>
							<p class="g-b-s-con">4.组团失败：在有效时间内未凑齐人数，即为组团失败，此时商城会将原款分别退回；</p>
							<!-- <p class="g-b-s-con">5.中奖商品预计72小时内发货</p> -->
						</li>
					</ul>
					<!--{if $team_log}  等待成团-->
					<div class="padding-all">
						<p class="font-05 col-9">不想开团，和以下小伙伴一起拼了</p>
						<!--{foreach from=$team_log item=team key =key}-->
						<div class="dis-box group-list-box m-top12">
							<div class="left-box">
								<div class="left-img">
									<!--{if $team.avatar}-->
									<img src="{$team.avatar}" class="img">
									<!--{else}-->
									<img src="__TPL__/images/member-photo-img2.jpeg" class="img">
									<!--{/if}-->
								</div>
							</div>
							<div class="box-flex list-two">
							<ul class="goods-time-box">
								<li><h4 class="font-05 col-3 onelist-hidden">{$team.name}</h4></li>
								
						
							<li><div class="box-flex font-05 list-cont onelist-hidden text-c">还差<em class="ec-color">{$team.surplus}</em>人成团</div></li>
								</ul>
								<p class="col-9 font-01 onelist-hidden" style="display:none">剩余：{$team.end_time}</p>
								<p class="col-9 font-01 onelist-hidden m-top04" id="fnTimeCountDown_{$key}"  data-end="{$team.end_time}"> 剩余
									<span style="display:none" class="year">00</span>
									<span style="display:none" class="month">00</span>
									<span style="display:none" class="day">0</span>
									<span class="hour">0</span>:
									<span class="mini">0</span>:
									<span class="sec">0</span>
									结束
								</p>
							</div>
						
							<a href="{:url('goods/team_goods_wait',array('team_id'=>$this->_var['team']['team_id']))}" class="right-btn b-color ec-white font-05">去参团<i class="iconfont icon-mn-jiantour font-03"></i></a>
						</div>
						<!--{/foreach}-->
					</div>
					<!--{/if}-->
				</section>
				<!--{/if}验证是否是团购商品end-->
				
				<!--倒计时 sty-->
				<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>
				<script type="text/javascript">
					$.extend($.fn,{
						//懒人建站 http://www.51xuediannao.com/
						fnTimeCountDown:function(d){
							this.each(function(){
								var $this = $(this);
								var o = {
									hm: $this.find(".hm"),
									sec: $this.find(".sec"),
									mini: $this.find(".mini"),
									hour: $this.find(".hour"),
									day: $this.find(".day"),
									month:$this.find(".month"),
									year: $this.find(".year")
								};
								var f = {
									haomiao: function(n){
										if(n < 10)return "00" + n.toString();
										if(n < 100)return "0" + n.toString();
										return n.toString();
									},
									zero: function(n){
										var _n = parseInt(n, 10);//解析字符串,返回整数
										if(_n > 0){
											if(_n <= 9){
												_n = "0" + _n
											}
											return String(_n);
										}else{
											return "00";
										}
									},
									dv: function(){
										//d = d || Date.UTC(2050, 0, 1); //如果未定义时间，则我们设定倒计时日期是2050年1月1日
										var _d = $this.data("end") || d;
										var now = new Date(),
											endDate = new Date(_d);
										//现在将来秒差值
										//alert(future.getTimezoneOffset());
										var dur = (endDate - now.getTime()) / 1000 , mss = endDate - now.getTime() ,pms = {
											hm:"000",
											sec: "00",
											mini: "00",
											hour: "00",
											day: "00",
											month: "00",
											year: "0"
										};
										if(mss > 0){
											pms.hm = f.haomiao(mss % 1000);
											pms.sec = f.zero(dur % 60);
											pms.mini = Math.floor((dur / 60)) > 0? f.zero(Math.floor((dur / 60)) % 60) : "00";
											pms.hour = Math.floor((dur / 3600)) > 0? f.zero(Math.floor((dur / 3600)) % 24) : "00";
											pms.day = Math.floor((dur / 86400)) > 0? f.zero(Math.floor((dur / 86400)) % 30) : "00";
											//月份，以实际平均每月秒数计算
											pms.month = Math.floor((dur / 2629744)) > 0? f.zero(Math.floor((dur / 2629744)) % 12) : "00";
											//年份，按按回归年365天5时48分46秒算
											pms.year = Math.floor((dur / 31556926)) > 0? Math.floor((dur / 31556926)) : "0";
										}else{
											pms.year=pms.month=pms.day=pms.hour=pms.mini=pms.sec="00";
											pms.hm = "000";
											//alert('结束了');
											return;
										}
										return pms;
									},
									ui: function(){
										if(o.hm){
											o.hm.html(f.dv().hm);
										}
										if(o.sec){
											o.sec.html(f.dv().sec);
										}
										if(o.mini){
											o.mini.html(f.dv().mini);
										}
										if(o.hour){
											o.hour.html(f.dv().hour);
										}
										if(o.day){
											o.day.html(f.dv().day);
										}
										if(o.month){
											o.month.html(f.dv().month);
										}
										if(o.year){
											o.year.html(f.dv().year);
										}
										setTimeout(f.ui, 1);
									}
								};
								f.ui();
							});
						}
					});
/*首页二维码*/
	$(".j-ewm-box").click(function() {
		document.addEventListener("touchmove", handler, false);
		$(".index-bg-box").addClass("active");
		$(".index-weixin-box").addClass("active");
	});
	$(".j-ewm-close").click(function() {
		document.removeEventListener("touchmove", handler, false);
		$(".index-bg-box").removeClass("active");
		$(".index-weixin-box").removeClass("active");
	});
	$(".index-bg-box").click(function() {
		document.removeEventListener("touchmove", handler, false);
		$(".index-bg-box").removeClass("active");
		$(".index-weixin-box").removeClass("active");
	});
				</script>
				<!--{foreach from=$team_log item=team key=key}-->
				<script type="text/javascript">
					$("#fnTimeCountDown_{$key}").fnTimeCountDown();
				</script>
				<!--{/foreach}-->
				<!--倒计时 end-->
				
				<!--用户评价-->
				<section class="m-top10 goods-evaluation" id="evaluation-detail">
					<a href="{:url('goods/comment_list',array('id'=>$this->_var['goods']['goods_id']))}">
						<div class="dis-box padding-all b-color-f  g-evaluation-title position-rel">
							<label class="col-7 font-05 g-t-temark">用户评价</label>
							<div class="box-flex font-05 col-5">好评率 <em class="ec-tag">{$comments.favorable}%</em></div>
							<div class="t-goods1 col-7 font-05"><em class="ec-tag">{$comments.count}</em><span class="t-jiantou-2">人评论<i class="iconfont icon-mn-jiantour font-03"></i></span></div>
						</div>
					</a>

					<!--{foreach from=$comment_list item="comment" name="com"}-->
					<div class="padding-all m-top1px b-color-f dis-box goods-evaluation-box">
						<div class="goods-evaluation-left">
							<div class="evaluation-img">
								<!--{if $comment.avatar}-->
								<img src="{$comment.avatar}" class="img">
								<!--{else}-->
								<img src="__TPL__/images/member-photo-img2.jpeg" class="img">
								<!--{/if}-->
							</div>
						</div>
						<div class="box-flex">
							<div class="dis-box">
								<h4 class="col-6 font-06 box-flex">{$comment.user_name|escape:html}</h4>
								<div class="evaluation-num fr of-hidden"><span class="grade-star g-star-{$comment.comment_rank}"></span></div>
							</div>
							<p class="clear m-top04 col-9 font-05">{$comment.add_time}</p>
							<p class="clear m-top06 col-3 font-05">{$comment.content}</p>
						</div>
					</div>
					<!--{/foreach}-->
				</section>

				<div class="goods-info of-hidden ect-tab b-color-f j-goods-info j-ect-tab ts-3 m-top08" id="goods-detail-box">
					<div class="hd j-tab-title tab-title b-color-f of-hidden">
						<ul class="dis-box">
							<li class="box-flex active">商品详情</li>
							<li class="box-flex">规格参数</li>
						</ul>
					</div>
					<div id="j-tab-con" class="b-color-f m-top1px tab-con ">
						<div class="swiper-wrapper">
							<section class="swiper-slide ">
								<div class="padding-all n-goods-detail">
									<!--{if $goods.goods_desc}-->
									{$goods.goods_desc}
									<!--{else}-->
									<div class="no-div-message">
										<i class="iconfont icon-biaoqingleiben"></i>
										<p>亲，此处没有内容～！</p>
									</div>

									<!--{/if}-->
								</div>
							</section>
							<section class="swiper-slide goods-info-attr">
								<div class="padding-all n-goods-detail">
									<!--{if $properties}-->
									<ul class="t-remark">
										<!-- {foreach from=$properties item=property_group key=key} -->
										<!-- {foreach from=$property_group item=property} -->
										<li class="of-hidden"><span class="fl">[{$property.name|escape:html}]</span><span class="fr">{$property.value}</span></li>
										<!-- {/foreach}-->
										<!-- {/foreach}-->
									</ul>
									<!--{else}-->
									<div class="no-div-message">
										<i class="iconfont icon-biaoqingleiben"></i>
										<p>亲，此处没有内容～！</p>
									</div>
									<!--{/if}-->
								</div>
							</section>
						</div>
					</div>
				</div>
				<!--飞入购物车小图s-->	
				<div id="flyItem" class="fly_item"><img src="{$goods.goods_img}" width="35" height="35"></div>
				<!--飞入购物车小图e-->
				<section class="goods-attr">
					<section class="filter-btn dis-box mr-auto">
						<a href="{:url('flow/cart')}" class="filter-btn-flow filter-btn-a">
							<span class="goods-flow-icon"><i class="iconfont icon-cart"></i>
									<!--飞入购物车位置s-->									
										<span class="quick_links" id="shopCart"></span>															
									<!--飞入购物车位置e-->
								<sup class="b-color" id='total_number'><!--{if $seller_cart_total_number }-->{$seller_cart_total_number}<!--{else}-->0<!--{/if}--></sup><em>购物车</em></span></a>

						<!--单独购买 star-->
						<div class=" j-goods-attr j-show-div box-flex">
							<!--{if $goods.is_team}验证是否是团购商品-->
							<a href="javascript:;" class="group-btn-box btn-hs-1 text-c">
															<h4 class="font-06">单独购买</h4>
								<p class="font-03">
									<!--{if $goods.is_promote and $goods.gmt_end_time } 促销-->
									{$goods.promote_price}
									<!--{else}-->
									{$goods.shop_price_formated}
									<!--{/if}-->
								</p>
							</a>
							<!--{else}-->	
<div class="dis-box">							
							<a href="javascript:;" class="box-flex btn-p btn-cart text-c">
								<h4 class="font-06">加入购购车</h4>
								
							</a>
							<a href="javascript:;" class="box-flex btn-p btn-submit text-c">
								<h4 class="font-06">立即购买</h4>
								
							</a>
						</div>	
							<!--{/if}-->
							<!--商品属性弹出层star-->
							<form action="javascript:addToCart({$goods.goods_id})" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY">
								<div class="show-goods-attr j-filter-show-div ts-3 b-color-1">
									<section class="s-g-attr-title b-color-t  product-list-small">
										<div class="product-div">
											<img class="product-list-img" src="{$goods.goods_img}">
											<div class="product-text">
												<div class="dis-box position-rel">
													<h4 class="box-flex">{$goods.goods_style_name}</h4>
													<i class="iconfont icon-guanbi show-div-guanbi"></i>
												</div>
												<p>
													<span class="p-price ec-tag" id="ECS_GOODS_AMOUNT">
											<!--{if $goods.is_promote and $goods.gmt_end_time } 促销-->
											{$goods.promote_price}
											<!--{else}-->
											{$goods.shop_price_formated}
											<!--{/if}-->
										</span>
												</p>
												<!--{if $cfg.show_goodsnumber}商品库存-->
												<p class="dis-box p-t-remark"><span class="box-flex">库存:{$goods.goods_number}</span></p>
												<!--{/if}-->
											</div>
										</div>
									</section>
									<section class="s-g-attr-con swiper-scroll b-color-f padding-all m-top1px swiper-container-vertical swiper-container-free-mode">
										<div class="swiper-wrapper">
											<!--商品属性选择-->
											<div class="swiper-slide swiper-slide-active">
												<!-- {foreach name=spec from=$specification item=spec key=spec_key} -->
												<h4 class="t-remark">{$spec.name}</h4>
												<ul class="select-one j-get-one m-top10 goods-attribute-cont">
													<!-- {foreach from=$spec.values item=value key=key} -->
													<li class="ect-select dis-flex fl">
														<input type="<!-- {if $spec.attr_type eq 1} -->radio<!-- {else} -->checkbox<!-- {/if} -->" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}" {if $key eq 0}checked{/if} onclick="changePrice()" />
														<label class="ts-1 {if $key eq 0}active{/if}" for="spec_value_{$value.id}">{$value.label}</label>
													</li>
													<!-- {/foreach} -->
												</ul>
												<!-- {/foreach} -->
												<h4 class="t-remark">数量</h4>
												<div class="div-num-1 dis-box m-top08">
													<a class="num-less" onClick="changePrice('1')"></a>
													<input class="box-flex" type="text" value="1" name="number" id="goods_number" onkeyup="value=value.replace(/[^\d]/g,'')" autocomplete="off" onblur="changePrice('2')" />
													<a class="num-plus" onClick="changePrice('3')"></a>
												</div>
											</div>
										</div>
										<div class="swiper-scrollbar"></div>
									</section>
							</form>
							<section class="dis-box goods-btn-box">
								<a type="button" class="show-div-guanbi btn-p btn-cart box-flex n-cart-box btnCart" id="add-cart" onClick="addToCart({$goods.goods_id});">加入购物车</a>
								<a type="button" class="btn-p btn-submit box-flex" onClick="addToCart_quick({$goods.goods_id});">立即购买</a>
							</section>
							</div>
							<!--商品属性弹出层end-->

						</div>
						<!--单独购买 end-->
						
						<!--拼团 star-->
						<!--{if $goods.is_team}验证是否是团购商品star-->
						<div class="j-goods-attr-1 j-show-div-1 box-flex">							
							<!--{if $team_id} 参团-->
							<a href="javascript:;" class="btn-p group-btn-box btn-submit  ec-white text-c">
								<h4 class="font-06">立即参团</h4>
								<p class="font-03">￥{$goods.team_price}</p>
							</a>
							<!--{else} 去开团-->
							<a href="javascript:;" class="btn-p group-btn-box btn-submit ec-white text-c">
								<h4 class="font-06">{$goods.team_num}人团</h4>
								<p class="font-03">￥{$goods.team_price}元</p>
							</a>
							<!--{/if}-->
							<!--拼团属性弹出层star-->
							<div class="mask-filter-div"></div>
							<div class="show-goods-attr-1 j-filter-show-div-1 ts-3 b-color-1">
								<section class="s-g-attr-title b-color-t  product-list-small">
									<div class="product-div">
										<img class="product-list-img" src="{$goods.goods_img}">
										<div class="product-text">
											<div class="dis-box position-rel">
												<h4 class="box-flex">{$goods.goods_style_name}</h4>
												<i class="iconfont icon-guanbi show-div-guanbi"></i>
											</div>
											<p>
												<span class="p-price ec-tag" id="TEAM_GOODS_AMOUNT">
													￥{$goods.team_price}元
												</span>
											</p>
											<!-- <p class="dis-box p-t-remark"><span class="box-flex">库存:{$goods.goods_number}</span></p> -->
											<p class="dis-box p-t-remark"><span class="box-flex">拼团限购:{$goods.astrict_num} 件</span></p>
										</div>
									</div>
								</section>
								<form action="{:url('goods/team_buy')}" method="post" name="TEAM_FORMBUY" id="TEAM_FORMBUY">
									<section class="s-g-attr-con swiper-scroll b-color-f padding-all m-top1px swiper-container-vertical swiper-container-free-mode">
										<div class="swiper-wrapper">
											<!--商品属性选择-->
											<div class="swiper-slide swiper-slide-active">

												<!-- {foreach name=spec from=$specification item=spec key=spec_key} -->
												<h4 class="t-remark">{$spec.name}</h4>
												<ul class="select-one j-get-one m-top10 goods-attribute-cont">
													<!-- {foreach from=$spec.values item=value key=key} -->
													<li class="ect-select dis-flex fl">
														<input type="<!-- {if $spec.attr_type eq 1} -->radio<!-- {else} -->checkbox<!-- {/if} -->" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}" {if $key eq 0}checked{/if} onclick="teamePrice()" />
														<label class="ts-1 {if $key eq 0}active{/if}" for="spec_value_{$value.id}">{$value.label}</label>
													</li>
													<!-- {/foreach} -->
												</ul>

												<!-- {/foreach} -->

												<h4 class="t-remark">数量</h4>
												<div class="div-num-1 dis-box m-top08">
													<a class="num-less" onClick="teamePrice('1')"></a>
													<input class="box-flex" type="text" value="1" name="number" id="team_goods_number" autocomplete="off" onkeyup="value=value.replace(/[^\d]/g,'')"  onblur="teamePrice('2')" />
													<a class="num-plus" onClick="teamePrice('3')"></a>
												</div>
											</div>
										</div>
										<div class="swiper-scrollbar"></div>
										<input type="hidden" name="goods_id" value="{$goods_id}" />
										<!--拼团id-->
										<input type="hidden" name="team_id" value="{$team_id}" />
									</section>
									<section class="dis-box goods-btn-box">
										<a type="button" class="btn-p btn-submit box-flex" onClick="document.getElementById('TEAM_FORMBUY').submit()">确定</a>
									</section>
								</form>
							</div>
							<!--拼团属性弹出层end-->
						</div>
						<!--{/if}验证是否是团购商品 end-->
						<!--拼团 end-->
					</section>

				</section>

			</div>
		</div>
		<div class="goods-scoll-bg"></div>
		<div class="filter-top" id="scrollUp">
			<i class="iconfont icon-dingbu"></i>
		</div>
		<!--悬浮菜单e-->
		<!--引用js-->
		<script type="text/javascript" src="__TPL__/team/js/jquery-2.1.4.min.js"></script>
		<script type="text/javascript" src="__TPL__/team/js/swiper.min.js"></script>
		<script type="text/javascript" src="__TPL__/team/js/ectouch.js"></script>
		<script type="text/javascript" src="__TPL__/team/layer/layer.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/jquery.json.js"></script>
		<script type="text/javascript" src="__TPL__/team/js/parabola.js"></script>

		<script type="text/javascript">
			/*相册控制*/
			document.getElementById('img-photo-box').style.width = document.body.offsetWidth + 'px';
			document.getElementById('img-photo-box').style.height = document.body.offsetWidth + 'px';
			window.onresize = function() {
				document.getElementById('img-photo-box').style.width = document.body.offsetWidth + 'px';
				document.getElementById('img-photo-box').style.height = document.body.offsetWidth + 'px';
			}

			/*切换*/
			var tabsSwiper = new Swiper('#j-tab-con', {
				speed: 100,
				noSwiping: true,
				autoHeight: true,
				onSlideChangeStart: function() {
					$(".j-tab-title .active").removeClass('active')
					$(".j-tab-title li").eq(tabsSwiper.activeIndex).addClass('active')
				}
			})
			$(".j-tab-title li").on('touchstart mousedown', function(e) {
				e.preventDefault()
				$(".j-tab-title .active").removeClass('active')
				$(this).addClass('active')
				tabsSwiper.slideTo($(this).index())
			})
			$(".j-tab-title li").click(function(e) {
				e.preventDefault()
			})

			/*店铺信息商品滚动*/
			var swiper = new Swiper('.j-g-s-p-con', {
				scrollbarHide: true,
				slidesPerView: 'auto',
				centeredSlides: false,
				grabCursor: true
			});
			var mySwiper = new Swiper('.banner-first', {
				pagination: '.banner-first-pagination',
				loop: false,
				grabCursor: true,
				paginationClickable: true,
				autoplayDisableOnInteraction: false,
				loop: true,
				autoplay: 3000,
				lazyLoading: true
			});

			var goodsId = {$goods_id};

			//自动加载
			changePrice();

			/**
			 * 点选可选属性或改变数量时修改商品价格的函数
			 */
			function changePrice(type) {
				var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
				if(type == 1) {
					qty--;
				}
				if(type == 3) {
					qty++;
				}
				if(qty <= 0) {
					qty = 1;
				}
				if(!/^[0-9]*$/.test(qty)) {
					qty = document.getElementById('back_number').value;
				}
				document.getElementById('goods_number').value = qty;
				var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
				$.get('{:url("goods/price")}', {
					'id': goodsId,
					'attr': attr,
					'number': qty
				}, function(data) {
					changePriceResponse(data);
				}, 'json');
			}
			/**
			 * 接收返回的信息
			 */
			function changePriceResponse(res) {
				if(res.err_msg.length > 0) {
					alert(res.err_msg);
				} else {
					if(document.getElementById('ECS_GOODS_AMOUNT'))
						document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
				}
			}
			
			//自动加载
			teamePrice();

			/**
			 * 点选可选属性或改变数量时修改商品价格的函数
			 */
			function teamePrice(type) {
				var qty = document.forms['TEAM_FORMBUY'].elements['number'].value;
				if(type == 1) {
					qty--;
				}
				if(type == 3) {
					qty++;
				}
				if(qty <= 0) {
					qty = 1;
				}
				if(!/^[0-9]*$/.test(qty)) {
					qty = document.getElementById('back_number').value;
				}
				document.getElementById('team_goods_number').value = qty;
				var attr = getSelectedAttributes(document.forms['TEAM_FORMBUY']);
				$.get('{:url("goods/team_price")}', {
					'id': goodsId,
					'attr': attr,
					'number': qty
				}, function(data) {
					teamPriceResponse(data);
				}, 'json');
			}
			/**
			 * 接收返回的信息
			 */
			function teamPriceResponse(res) {
				if(res.err_msg.length > 0) {
					document.getElementById('team_goods_number').value = res.qty;
					alert(res.err_msg);
					
				} else {
					if(document.getElementById('TEAM_GOODS_AMOUNT'))
						document.getElementById('TEAM_GOODS_AMOUNT').innerHTML = res.result;
				}
			}
						//滚动-nav
			var swiper_nav = new Swiper('.shopping-list-nav', {
				scrollbarHide: true,
				slidesPerView: 'auto',
				centeredSlides: false,
				grabCursor: true
			});
			var mySwiper = new Swiper('.banner-second', {
					pagination: '.banner-second-pagination',
				});
			$('.shopping-list-nav li').on('click', function(e) {
					var category = $(this).attr('category');
					var index = $(".shopping-list-nav li").index(this);
					$(this).siblings().removeClass("active");
					$('.shopping-abs .swiper-slide a').removeClass("active");

					$(".div" + category).addClass("active");

					swiper_nav.slideTo(index, 1000, false); //切换到第一个slide，速度为1秒

					infinite.onload('where=' + category + '&type=1');
					var swiper = new Swiper('.j-g-s-p-con', {
						scrollbarHide: true,
						slidesPerView: 'auto',
						centeredSlides: false,
						grabCursor: true

					});
			})
		// 元素以及其他一些变量
		var eleFlyElement = document.querySelector("#flyItem"),
			eleShopCart = document.querySelector("#shopCart");
		var numberItem = 0;
		// 抛物线运动
		var myParabola = funParabola(eleFlyElement, eleShopCart, {
			speed: 10, //抛物线速度
			curvature: 0.022, //控制抛物线弧度
			complete: function() {
				eleFlyElement.style.visibility = "hidden";
				//eleShopCart.querySelector("span").innerHTML = ++numberItem;
			}
		});
		// 绑定点击事件
		if(eleFlyElement && eleShopCart) {

			[].slice.call(document.getElementsByClassName("btnCart")).forEach(function(button) {
				button.addEventListener("click", function(event) {
					// 滚动大小
					var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft || 0,
						scrollTop = document.documentElement.scrollTop || document.body.scrollTop || 0;
					eleFlyElement.style.left = event.clientX + scrollLeft + "px";
					eleFlyElement.style.top = event.clientY + scrollTop + "px";
					eleFlyElement.style.visibility = "visible";

					// 需要重定位
					myParabola.position().move();
				});
			});
		}
	</script>
	</body>

</html>